home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Electronic Library of Art: Renaissance Masters
/
Electronic Library of Art - Renaissance Masters I (EBook)(ELARM1-92)(1992).ISO
/
setup.inf
< prev
next >
Wrap
Text File
|
1993-09-12
|
30KB
|
780 lines
;;SETUP.INF file for EBook Electronic Library of Art
;;this file is for the Renaissance I
SetVariable(ProgPath,"C:\EBOOK")
SetVariable(ProgName,"EBOOK2.EXE")
SetVariable(InstallName, "Electronic Library of Art--Italian Renaissance Part 1")
SetVariable(DataSpace,"1.7 Megabytes")
SetVariable(ProgSpace,"700 Kilobytes")
SetVariable(EbookSize, 700 000)
SetVariable(DataSize, 1 700 000)
SetVariable(TitleName,"EBook")
SetVariable(IniName,"EBOOK.INI")
GetCurPath (CurPath)
; The following instructions are displayed several times so we put the
; text in a variable.
;
SetVariable (InsAskPath,
"Modify the default path if necessary, and then click on {\b OK} or "
"press {\b Enter} to continue. ")
SetVariable (InsBadPath,
"The path is currently not valid. You must specify a drive "
"letter, a colon, and a directory from the root of the drive. ")
; Set the title of all dialog windows.
;
WindowTitle (<InstallName>" Setup")
; Set the instruction text used in the initial instructions window.
; Add Help instructions if the file SETUP.HLP exists.
;
SetVariable (InitialInstructions,
"Click on {\b OK} or press {\b Enter} to continue. "
"To abort the setup, click on the {\b Exit} button at the "
"bottom right corner of the screen, or press {\b F3}. ")
IfFileExistsGoto ("SETUP.HLP", AddHelpInstructions)
Goto (DisplayInitialMessage)
AddHelpInstructions:
SetVariable (InitialInstructions,
<InitialInstructions> "You can always obtain help by "
"clicking on the {\b Help} button or pressing {\b F1}. ")
; Display the initial message.
;
DisplayInitialMessage:
DisplayMessage (
"The Setup program will install the " <InstallName> " on your hard disk."
" There are two options available for installation:%n%n"
"Run " <InstallName> " Entirely off of the CD-ROM.%n%n"
"Copy " <ProgName> " to your Hard Disk to improve execution speed.%n%n",
<InitialInstructions>)
;ask if user wants to copy the ebook files to hard disk
AskYesNo (Prompt, "Yes",
"The " <TitleName> " files require about " <ProgSpace> " of disk "
"space. Would you like to copy them to your hard disk?",
<TitleName> " Can be run from the CD-ROM, but copying it to your "
"Hard disk will improve execution speed.\par\par"
"Click on {\b Yes} or press {\b 'Y'} to copy the " <TitleName>
" files.\par "
"Click on {\b No} or press {\b 'N'} to proceed without copying the "
<TitleName> " source files.")
IfEqualGoto (<Prompt>, "No", DontPromptTitlePath)
AskAgain:
; Ask for where the Ebook files should be installed.
;
PromptEbookPath:
PromptPath (ProgPath, <ProgPath>,
"Where should Setup install the EBook files?",
<InsAskPath>, <InsBadPath>)
; Don't allow Ebook to be installed in the Windows directory
;
GetWinPath (WinPath)
GetWinSystemPath (SystemPath)
IfNotEqualGoto (<ProgPath>, <WinPath>, CheckSpace)
DisplayMessage (
"You cannot install EBook into the Windows directory. "
"Please enter another directory.",
"Click on {\b OK} or press {\b Enter} to enter another directory "
"for EBook.")
Goto (PromptEbookPath)
; Check if there is enough space to install the EBook files.
;
CheckSpace:
GetSpaceAvailable (SpaceAvailable, <ProgPath>)
IfLowerGoto (<EbookSize>, <SpaceAvailable>, EbookPathOK)
AskYesNo (Prompt, "Yes",
"There may not be enough space to install the "<InstallName>" Files."
" Would you like to enter a new path for the files? ",
"Click on {\b Yes} or press {\b 'Y'} to enter a new path for the "
"Ebook files.\par "
"Click on {\b No} or press {\b 'N'} to continue anyway.\par "
"Click on the {\b Exit} button or press {\b F3} to exit Setup. "
"You may wish to exit Setup and make some more space on your hard "
"disk. Run Setup again when there is enough space on your hard "
"disk. ")
IfEqualGoto (<Prompt>, "Yes", PromptEbookPath)
EbookPathOK:
;create the subdirectory
MakePath(<ProgPath>)
;copy the ebook files
OpenCopyProgress(
"Setup is copying the "<InstallName> " Program files.",
"Please wait while Setup is copying files.")
CopyFile("EBOOK2.EXE",<ProgPath> "EBOOK2.EXE", 250000)
CopyFile("TITLE.DIB",<ProgPath> "TITLE.DIB", 93000)
CopyFile("TITLE.WAV",<ProgPath> "TITLE.WAV", 180000)
CopyFile("EBOOK2.HLP",<ProgPath> "EBOOK2.HLP",50000)
CloseCopyProgress()
SetVariable(DataPath,<CurPath>"DATA")
GoTo(EbookCopied)
DontPromptTitlePath:
SetVariable(DataPath,<CurPath>"DATA")
SetVariable(ProgPath,<CurPath>)
GoTo(EbookNotCopied)
EbookCopied:
SetVariable(ProgPath,<ProgPath>)
EbookNotCopied:
;copy the ebook.ini file and add the paths
AddToProfileIni(<IniName>,"PATHS","CDROM",<CurPath>)
AddToProfileIni(<IniName>,"PATHS","PICTURE",<CurPath>"PIX")
AddToProfileIni(<IniName>,"PATHS","DATA",<CurPath>"DATA")
AddToProfileIni(<IniName>,"PATHS","INDEX",<CurPath>"DATA")
AddToProfileIni(<IniName>,"PATHS","PSTAMPPATH",<CurPath>"DATA")
AddToProfileIni(<IniName>,"PATHS","MIDIPATH",<CurPath>"MIDI")
;add the info for this title to ebook.ini
AddToProfileIni(<IniName>,"ELAVOL2","Title","Electronic Library of Art, Volume 2-The Italian Renaissance Part I")
AddToProfileIni(<IniName>,"ELAVOL2","Card","WINCARD2")
AddToProfileIni(<IniName>,"ELAVOL2","NumberIndex","6")
AddToProfileIni(<IniName>,"ELAVOL2","IndexNames","ARTIST2,TITLE2,MEDIUM2,DATE2,OBJ2,CSCHOOL2");
AddToProfileIni(<IniName>,"ELAVOL2","IndexTitles","Artist,Title,Medium,Date,Object,School");
AddToProfileIni(<IniName>,"ELAVOL2","PStamp","1")
AddToProfileIni(<IniName>,"ELAVOL2","BrowseMode","0")
AddToProfileIni(<IniName>,"ELAVOL2","NumberPixColumns","5")
AddToProfileIni(<IniName>,"ELAVOL2","NumberPixRows","3")
AddToProfileIni(<IniName>,"ELAVOL2","NumberMIDI","4")
AddToProfileIni(<IniName>,"ELAVOL2","MidiFiles","PRIMAVER,PROFUMIE,LASIRENA,CANTENA")
AddToProfileIni(<IniName>,"ELAVOL2","MidiTitles","Ecco la Primavera,Canto de'Profumieri,Balletto la Sirena,La Cantena D'Amore")
;cleanup
IfIncompleteGoto(NotInstalled)
Installed:
SetVariable (Message,
"The Setup program has successfully installed the "
<TitleName> ".%n%n")
GetCurPath (ViewerSrcDir) ; Source directory of the Viewer
SetVariable (ViewerSize, 1 000 000) ; Size of the Viewer files that will
; be copied over (measured in bytes)
SetVariable (ViewerDestDir, "C:\VIEWER\") ; Destination directory for
; the Viewer. Set default
; here.
;;*************Begin Title Specific Section***************************
;;
;; SetVariable (Variable, String)
;; ------------------------------
;; This command sets the variable named 'Variable' to the string
;; 'String'.
;;
;; Change this variable to be the name of the title.
;;
SetVariable (TitleName, "Renaissance Essay") ; Name of the title
;; Change this variable to be the basename of the title's MVB
;; file (i.e. the name of the MVB file without the .MVB
;; extension).
;;
SetVariable (TitleMVB, "ARTBOOK") ; Basename of the MVB file
;; Change this variable to be the subdirectory of the title
;; on the CD-ROM (i.e. where the MVB file is located). This
;; subdirectory will be in the Viewer directory on the CD-ROM,
;; where VIEWER.EXE and SETUP.EXE are located. Do not specify
;; the complete path for this subdirectory.
;;
SetVariable (TitleSrcDir, "\ESSAY\") ; Source subdirectory of the title
;;***************End Title Specific Section***************************
;;
;; GetCurPath (Variable)
;; ---------------------
;; This command sets the variable 'Variable' to the current path.
;; This is the full path of the directory in which SETUP.EXE was
;; started. A directory name ends in a backslash.
;;
DisplayInitialMessage:
DisplayMessage (
"
This Setup program will install:
The Renaissance in Italy, an Essay,
and the Multimedia Viewer.
You will be prompted for the location for the
Multimedia Viewer. This will require about 1
Megabyte of disk space.",
<InitialInstructions>)
;;
;; GetFromWinIni (Variable, Section, Name, Default)
;; ------------------------------------------------
;; This command reads the WIN.INI file entry 'Name' under the section
;; 'Section' and sets the variable 'Variable' to the result. If the
;; specified section or entry were not found, then the specified
;; variable is set to the string 'Default'.
;;
; Determine if the Viewer has been installed before.
; If the WIN.INI file contains information on where the Viewer directory
; is located, then make that the default path to install the Viewer.
;
GetFromWinIni (ViewerDestDirTemp,
"Multimedia Viewer", "ViewerPath", "Undefined")
;;
;; IfEqualGoto (String1, String2, Label)
;; -------------------------------------
;; This command will do a case insensitive compare on the strings
;; 'String1' and 'String2' and branch to label 'Label' if they match.
;;
IfEqualGoto (<ViewerDestDirTemp>, "Undefined", PromptViewerDestDir)
SetVariable (ViewerDestDir, <ViewerDestDirTemp>)
AskAgain2:
;;
;; PromptPath (Variable, Default, Message, ValidInstructions,
;; InvalidInstructions)
;; ----------------------------------------------------------
;; This command causes a dialog box to appear that prompts the user
;; for a path. The path is a directory that the setup script can use
;; to copy into, make, etc. The message 'Message' is shown at the top
;; of the dialog, and the default path is 'Default'. When PromptPath
;; is invoked, Setup checks that the default specified in the INF file
;; is a valid path on the user's machine.
;;
;; The PromptPath dialog can be in two states. Whenever the edit box
;; contains a valid path, the OK button is available and the
;; 'ValidInstructions' text is displayed in the instruction window.
;; Whenever the edit box contains an invalid path, the OK button is
;; grayed out and the 'InvalidInstructions' text is displayed in the
;; instruction window.
;;
;; All characters typed in the path edit box appear as upper case no
;; matter what the keyboard shift state is in. When the OK button is
;; enabled, the user can click on the OK button or press Enter, upon
;; which the path is placed in the variable 'Variable'. Before
;; returning the path however, PromptPath will translate all forward
;; slashes to back slashes and ensure that the path ends in a
;; back slash.
;;
; Ask for where the Multimedia Viewer should be installed.
;
PromptViewerDestDir:
PromptPath (ViewerDestDir, <ViewerDestDir>,
"Where should Setup install the Multimedia Viewer?",
"Modify the default path if necessary, and then click on {\b OK} or "
"press {\b Enter} to continue. ",
"The path is currently not valid. You must specify a drive "
"letter, a colon, and a directory from the root of the drive. ")
;;
;; GetWinPath (Variable)
;; ---------------------
;; This command sets the variable 'Variable' to the path of the
;; Windows directory. The directory name ends in a backslash.
;;
;;
; Don't allow Viewer to be installed in the Windows directory
;
GetWinSystemPath (SystemPath)
GetWinPath (WinPath)
IfNotEqualGoto (<ViewerDestDir>, <WinPath>, CheckSpace2)
DisplayMessage (
"You cannot install the Viewer into the Windows directory. "
"Please enter another directory.",
"Click on {\b OK} or press {\b Enter} to enter another directory "
"for Viewer.")
Goto (PromptViewerDestDir)
;;
;; GetSpaceAvailable (Variable, Path)
;; ----------------------------------
;; This command finds the number of bytes available on the disk of
;; the full path 'Path', and sets the variable 'Variable' to the
;; string representation of this value. The value 0 is returned if
;; the specified volume does not exist or cannot be read.
;;
; Check if there is enough space to install the Viewer.
;
CheckSpace2:
GetSpaceAvailable (SpaceAvailable, <ViewerDestDir>)
;;
;; IfLowerGoto (Number1, Number2, Label)
;; -------------------------------------
;; This command will compare 'Number1' and 'Number2', which are
;; strings interpreted as integers. If 'Number1' is lower than
;; 'Number2' then execution branches to 'Label'.
;;
IfLowerGoto (<ViewerSize>, <SpaceAvailable>, ViewerDestDirOK)
;;
;; AskYesNo (Variable, Default, Question, Instructions)
;; ----------------------------------------------------
;; This command displays the string 'Question' in a dialog box and the
;; instruction text 'Instructions' in the instruction window. The
;; dialog box has two buttons, labeled "Yes" and "No". The string
;; 'Default' should be either "Yes" or "No" to specify which button is
;; the default button. After a button is pushed, the variable
;; 'Variable' is set to the string "Yes" or the string "No" as
;; appropriate.
;;
AskYesNo (Prompt, "Yes",
"There may not be enough space to install the Multimedia Viewer. "
"Would you like to enter a new path for the files? ",
"Click on {\b Yes} or press {\b 'Y'} to enter a new path for the "
"Multimedia Viewer files.\par "
"Click on {\b No} or press {\b 'N'} to continue anyway.\par "
"Click on the {\b Exit} button or press {\b F3} to exit Setup. "
"You may wish to exit Setup and make some more space on your hard "
"disk. Run Setup again when there is enough space on your hard "
"disk. ")
IfEqualGoto (<Prompt>, "Yes", PromptViewerDestDir)
ViewerDestDirOK:
AskYesNo (AskAgain, "No",
"Would you like to change anything before proceeding with "
"the installation?",
"Click on {\b Yes} or press {\b 'Y'} to reenter options.\par "
"Click on {\b No} or press {\b 'N'} to proceed with installation. ")
IfEqualGoto (<AskAgain>, "Yes", AskAgain2)
;;
;; MakePath (Path)
;; ---------------
;; This command causes the path 'Path' to be created if it does not
;; already exist. To make the path, MakePath creates any
;; subdirectories that do not already exist. If the path cannot be
;; created, then no error will be reported, as the problem will
;; normally be detected when Setup attempts to copy files to this
;; path.
;;
; Create the tree structure.
;
MakePath (<ViewerDestDir>)
;;
;; OpenCopyProgress (Message, Instructions)
;; ----------------------------------------
;; This command begins a file manipulation section. The command will
;; open a progress bar dialog with the message 'Message' and the
;; instruction text 'Instructions'. Following this command, only the
;; commands 'SetProgressBarMsg', 'PromptChangeDisk', 'CopyFile',
;; 'AppendFile', 'UpdateFile', 'TranslateFile', 'DeleteFile',
;; 'RenameFile', 'Goto', 'IfEqualGoto', 'IfNotEqualGoto', 'ErrorExit',
;; 'IfLowerGoto', 'IfHigherGoto', 'IfFileExistsGoto', 'Pause', and
;; 'MakePath' are allowed until the 'CloseCopyProgress' command is
;; reached. An error is reported and Setup is aborted if any other
;; commands are encountered while the progress bar is displayed.
;;
; Copy the files
;
OpenCopyProgress(
"Setup is copying the Multimedia Viewer runtime files.",
"Please wait while Setup is copying files.")
;;
;; CopyFile (Source, Destination, Size)
;; ------------------------------------
;; This command copies the file 'Source' to the file 'Destination'.
;; The current disk and directory will be that of the Setup
;; executable. Normally the files to copy will be in the same place
;; (although a volume change may be required---see PromptChangeDisk)
;; so a relative path is normally used for the source file name.
;; Normally variables are used to specify a complete destination file
;; name that depends on the user's path selection. Any directories
;; specified in the destination path must already exist---they are
;; normally created using the MakePath commands.
;;
;; The 'Size' field specifies the size of the source file. In order
;; to initialize the progress bar it is necessary to find the total
;; number of bytes to copy between the OpenCopyProgress command and
;; the CloseCopyProgress command. Since files may span several disks,
;; it would be impractical to obtain this size directly from the
;; source file. The size field is only required to maintain the
;; progress bar, and, although it need not be exact, it should be
;; close to reality to maintain the accuracy of the progress bar.
;;
;; If an error occurs (such as File Not Found, Read Error, Write
;; Error) then an error dialog is shown, at which point the user has
;; the option to Abort Setup, Retry the copy operation, or Ignore the
;; copy error. Selecting Abort has the same effect as pressing <F3>.
;; Selecting Retry causes the operation to be retried. Finally,
;; selecting Ignore causes copying to continue despite the error. The
;; latter option will likely result in an incomplete Setup. The
;; command 'IfIncompleteGoto' can be used subsequently to give the
;; user an appropriate message.
;;
;; Files compressed using the Windows SDK COMPRESS utility will
;; automatically be decompressed as they are being copied to the hard
;; disk.
;;
CopyFile ("FTENGINE.DLL", <ViewerDestDir> "FTENGINE.DLL", 50000)
CopyFile ("FTUI.DLL", <ViewerDestDir> "FTUI.DLL", 75000)
CopyFile ("MMP.DLL", <ViewerDestDir> "MMP.DLL", 200000)
CopyFile ("MVAFF.DLL", <ViewerDestDir> "MVAFF.DLL", 50000)
CopyFile ("MVAPI.DLL", <ViewerDestDir> "MVAPI.DLL", 10000)
CopyFile ("MVAUDDLG.DLL", <ViewerDestDir> "MVAUDDLG.DLL", 50000)
CopyFile ("MVAUDIO.DLL", <ViewerDestDir> "MVAUDIO.DLL", 10000)
CopyFile ("MVBMP.DLL", <ViewerDestDir> "MVBMP.DLL", 50000)
CopyFile ("QKHOOK.DLL", <ViewerDestDir> "QKHOOK.DLL", 10000)
CopyFile ("QUICKEYS.EXE", <ViewerDestDir> "QUICKEYS.EXE", 25000)
CopyFile ("VIEWER.EXE", <ViewerDestDir> "VIEWER.EXE", 250000)
CopyFile ("DISPDIB.DLL", <SystemPath> "DISPDIB.DLL", 10000)
CopyFile ("VER.DLL", <SystemPath> "VER.DLL", 80000)
CopyFile ("QUICKEYS.HLP", <ViewerDestDir> "QUICKEYS.HLP", 25000)
CloseCopyProgress ()
;;*************Begin Title Specific Section***************************
;;
;; SetVariable (Variable, String)
;; ------------------------------
;; This command sets the variable named 'Variable' to the string
;; 'String'.
;;
;;***************End Title Specific Section***************************
;;
;; GetCurPath (Variable)
;; ---------------------
;; This command sets the variable 'Variable' to the current path.
;; This is the full path of the directory in which SETUP.EXE was
;; started. A directory name ends in a backslash.
;;
;;
;; CloseCopyProgress ()
;; --------------------
;; This command closes the copy progress bar.
;;
;;*************Begin Title Specific Section***************************
;;
;; OpenProgmanProgress (Message, Instructions)
;; -------------------------------------------
;; This command begins a Program Manager installation section.
;; This command will put up a progress bar with the message 'Message'
;; and the instructions 'Instructions'. Following this command, only
;; the commands 'SetProgressBarMsg', 'OpenProgmanGroup', 'ErrorExit',
;; 'AddProgmanItem', 'Goto', 'IfEqualGoto', 'IfNotEqualGoto',
;; 'IfLowerGoto', 'IfHigherGoto', 'IfFileExistsGoto', and 'Pause' are
;; allowed until the 'CloseProgmanProgress' command is reached. An
;; error is reported and Setup is aborted if any other commands are
;; encountered while the progress bar is displayed.
;;
; Begin adding Progam Manager groups
;
;;
;; OpenProgmanGroup (Group[, DeleteFlag])
;; ---------------------------------------
;; This command will set up a DDE conversation with the Program
;; Manager and open the program group entitled 'Group'. If the
;; optional string 'Delete' is specified and is equal to "Delete",
;; then the specified group will be deleted if it exists, before it is
;; created. Normally this Delete flag is specified to create a new
;; program group, and is omitted to add to an existing group.
;;
;; The progress bar will display the words "Opening" followed by the
;; name of the ProgMan group. If OpenProgmanGroup fails then no error
;; is reported.
;;
; Add a specific Program Manager group.
;
;OpenProgmanGroup (<TitleName>, Delete) ;; Add the group named after the title
;;
;; AddProgmanItem (Item, Command, IconFile, IconNumber)
;; ----------------------------------------------------
;; This command will add a new icon to the Program Manager group
;; opened by OpenProgmanGroup. The icon will have the title 'Item',
;; the command string 'Command', the icon file 'IconFile' and the
;; 0-based icon index within the icon file 'IconNumber'. Variables
;; can be used to specify a complete path for the command and icon
;; files that are dependent on the user's path choices.
;;
;; The progress bar will display the words "Adding" followed by the
;; item name. If AddProgramItem fails then no error is reported.
;;
;add the program group
OpenProgManProgress("Setup is adding a Program Manager Group for Ebook",
"Please wait while Setup adds the Group")
OpenProgManGroup("Ebook")
AddProgManItem("ELA Renaissance Part I",<ProgPath>"EBOOK2.EXE ELAVOL2",
<ProgPath>"EBOOK2.EXE" ,0)
;AddProgmanItem (<TitleName>,
; <ViewerDestDir> "VIEWER.EXE " <ViewerSrcDir>"ESSAY\"<TitleMVB> ".MVB",
; <ViewerSrcDir>
; "ESSAY\EBOOK.ICO", ;; Change this to be the icon (ICO)
;; ;; file for the title.
; 0)
;;
;; CloseProgmanProgress ()
;; -----------------------
;; This command closes the ProgMan DDE conversation.
;;
CloseProgmanProgress ()
AddToProfileIni(<IniName>,"ELAVOL2","Essay","VIEWER.EXE " <ViewerSrcDir>"ESSAY\"<TitleMVB>".MVB")
;;
;; AddToProfileIni (File, Tag, Name, Value)
;; ----------------------------------------
;; This command is identical to AddToWinIni, except that any profile
;; file can be used. This can be used to access the SYSTEM.INI file
;; and any other private profile files. No error is reported if this
;; operation fails.
;;
; Update VIEWER.INI.
;
AddToProfileIni ("VIEWER.INI", <TitleMVB>, "Path",
<ViewerSrcDir> <TitleSrcDir>)
AddToProfileIni ("VIEWER.INI", "Files", <TitleMVB> ".MVB",
<ViewerSrcDir> <TitleSrcDir>
",Please insert the " <TitleName> " CD in the CD-ROM drive")
;; For each of the other books in a multiple-book title, add
;; a VIEWER.INI section that is named after the basename of
;; that book's MVB file (which should be in the same directory
;; as the main title's MVB file).
;;
AddToProfileIni ("VIEWER.INI",
"AESOP", ; Basename of the MVB file
"Path", <ViewerSrcDir> <TitleSrcDir>)
;;***************End Title Specific Section***************************
;;
;; AddToWinIni (Tag, Name, Value)
;; ------------------------------
;; This command adds or modifies the WIN.INI file entry 'Name' under
;; the tag 'Tag' to equal the string 'Value'. No error is reported if
;; this operation fails.
;;
; Update WIN.INI.
;
AddToWinIni ("Multimedia Viewer", "ViewerPath", <ViewerDestDir>)
AddToWinIni ("Extensions", "mvb", "viewer.exe ^.mvb")
;;
;; ModifyAutoexec (Path, Lib, Include, AskInstructions,
;; ReviewInstructions, SaveInstructions)
;; ----------------------------------------------------
;; This command ensures that the following environment variables in
;; the AUTOEXEC.BAT file are set:
;;
;; 1. the path 'Path' is present in the PATH variable
;; 2. the path 'Lib' is present in the LIB variable
;; 3. the path 'Include' is present in the INCLUDE variable
;;
;; If any of 'Path', 'Lib', or 'Include' is the null string (""),
;; then the corresponding environment variable is ignored.
;;
;; If an environment variable needs to be changed, a dialog window
;; is brought up. If all the required paths are already in the
;; current environment variables, then no dialog is shown. The
;; instruction window contains the instruction text 'AskInstructions'.
;;
;; If the default option to make the modifications is selected, then
;; the old AUTOEXEC.BAT file is saved to AUTOEXEC.BAK and the required
;; changes are made to the current AUTOEXEC.BAT file. Paths are added
;; to the beginning of the path list in the PATH, SET LIB, and
;; SET INCLUDE statements. If the statement to set the appropriate
;; environment variable is not present then the statement is added to
;; the end of the AUTOEXEC.BAT file. If the AUTOEXEC.BAT file is not
;; found, then a new AUTOEXEC.BAT file is created to contain these
;; new statements.
;;
;; If the option to review and edit the changes is chosen then the
;; following dialog is shown:
;;
;; The upper edit box shows the proposed changes to the AUTOEXEC.BAT
;; file and the lower edit box shows the current AUTOEXEC.BAT file
;; contents. The instruction window shows the instructon text
;; 'ReviewInstructions'. Any changes made to the upper edit box are
;; saved when the user clicks on the OK default button or presses
;; <Enter> to save the changes. The old AUTOEXEC.BAT is saved to the
;; file AUTOEXEC.BAK before the changes are made. The Cancel button
;; brings back the previous dialog.
;;
;; If the option to make the modifications later is chosen then the
;; following dialog is shown:
;;
;; Here the user can specify a file that will contain the
;; modifications made to the AUTOEXEC.BAT file. The instruction
;; window shows the instruction text 'SaveInstructions'. The default
;; filename is AUTOEXEC.NEW, but the user can changes this by editing
;; the file in the dialog box. To save the changes to the specified
;; file, the user clicks on the Save button or presses 'S' or Enter.
;; To not save the changes, the user clicks on the Don't Save button.
;; To return to the previous dialog, the user clicks on the Cancel
;; button or presses Esc.
;;
; Add the Viewer path to the PATH variable in the environment.
;
ModifyAutoexec (<ViewerDestDir>, "", "",
"Setup must now make some changes to your {\b AUTOEXEC.BAT} file. "
"Click on the desired option and click on {\b OK} to continue. With "
"the keyboard, use the arrow keys to select the desired option, and "
"then press {\b Enter} to continue.\par\par "
"{\b o} Select the first option to let Setup modify your "
"AUTOEXEC.BAT file\par "
"{\b o} Select the second option to view and change the changes "
"first\par "
"{\b o} Select the third option if you want to make the changes "
"yourself later on\par\par ",
"You can now view the proposed changes to the {\b AUTOEXEC.BAT} "
"file. If the changes were not made to your satisfaction, you can "
"modify the proposed batch file by editing the file in the top "
"window. Click on {\b OK} or press {\b Enter} to replace the "
"current batch file with the proposed one. To return to the "
"AUTOEXEC modification options dialog, click on {\b Cancel} or press "
"{\b Esc}.",
"Setup can save the proposed {\b AUTOEXEC.BAT} file to a file that "
"you specify. You will have to modify your own {\b AUTOEXEC.BAT} "
"file yourself and then reboot your computer in order for the Viewer "
"to function normally. To return to the AUTOEXEC modification "
"options dialog, click on {\b Cancel} or press {\b Esc}.")
; Assemble and display finished message
;;
;; IfIncompleteGoto (Label)
;; ------------------------
;; This command will branch to the label 'Label' if the installation
;; was incomplete. The installation is incomplete if there was an
;; error for any file that was copied to the hard disk and the user
;; specified to ignore the error. The installation is also incomplete
;; if the 'SetIncomplete' command was executed.
;;
IfIncompleteGoto (Incomplete)
SetVariable (Message,
"%nThe Setup program has successfully installed%n"
"the Multimedia Viewer and "<TitleName> ".%n%n")
Goto (CheckAutoexec)
Incomplete:
SetVariable (Message,
"Setup has finished, but the installation was incomplete. "
"You should correct any problems (such as insufficient disk "
"space, missing source files, or locked directories) and run "
"Setup again.%n%n")
CheckAutoexec:
;;
;; IfMustModifyGoto (Label)
;; ------------------------
;; This command will branch to the label 'Label' if Setup had to
;; modify the AUTOEXEC.BAT file, but the user chose to do the
;; modifications themselves later. The command will also branch
;; if the 'SetMustModify' command was executed.
;;
IfMustModifyGoto (MustModify)
;;
;; IfMustRebootGoto (Label)
;; ------------------------
;; This command will branch to the label 'Label' if Setup has
;; modified the AUTOEXEC.BAT file, and the user
;; must now reboot the computer. The command will also branch
;; if the 'SetMustReboot' command was executed.
;;
IfMustRebootGoto (MustReboot)
Goto (End)
MustModify:
SetVariable (Message,
<Message> "Remember to modify your AUTOEXEC.BAT file and reboot your "
"computer before using the Multimedia Viewer.%n%n")
Goto (End)
MustReboot:
SetVariable (Message,
<Message> "For the changes made by Setup to come into "
"effect, you must reboot your computer. To do this, you must first "
"exit Windows and then simultaneously hold down the Ctrl, Alt, and "
"Del keys. You must do this before using the Multimedia Viewer.%n%n")
End:
SetVariable (Message,
<Message> "%nThe advantages of being a registered user are numerous.%n"
"Please send in your Product Registration Card TODAY.")
GoTo(Exit)
NotInstalled:
SetVariable (Message,
"Setup has finished, but the installation was incomplete. "
"You should correct any problems (such as insufficient disk "
"space, missing source files, or locked directories) and run "
"Setup again.%n%n")
Exit:
DisplayMessage (<Message>,
"Click on {\b OK} or press {\b Enter} to return to the "
"Program Manager.")